home *** CD-ROM | disk | FTP | other *** search
/ .net 62 / dotnet_62_cd1.iso / pc / Redac / Scripts / net 61 mars 2002 / FAQ2.TXT < prev    next >
Encoding:
Text File  |  2002-01-21  |  1012 b   |  47 lines

  1. FAQ - Machine ‡ Ècrire
  2.  
  3. <head>
  4. <script language="Javascript">
  5. var texte = "Texte affichÈ dans la barre d'Ètat";
  6. var LongueurTexte = texte.length;
  7. var TexteAPlacer = "";
  8. var pause = 10;
  9. var i=0;
  10. var j=0;
  11. var LargeurAnimation = 5;
  12. var position=LargeurAnimation;
  13. function empilement() {
  14.     if (texte.charAt(i) != " ") {
  15.       TexteAPlacer = "";
  16.       for (j=0; j<i; j++) {
  17.         TexteAPlacer += texte.charAt(j);
  18.       }
  19.       for (j=i; j<position; j++) {
  20.         TexteAPlacer += " ";
  21.       }
  22.       TexteAPlacer += texte.charAt(i);
  23.       for (j=position; j<LargeurAnimation; j++) {
  24.         TexteAPlacer += " ";
  25.       }
  26.       window.status = TexteAPlacer;
  27.       if (position == i) {
  28.         LargeurAnimation++;
  29.         position = LargeurAnimation;
  30.         i++;
  31.       }
  32.       else {
  33.         position--;
  34.       }
  35.     }
  36.     else {
  37.       i++
  38.     }
  39.     if (i<LongueurTexte) {
  40.         setTimeout("empilement()",pause);
  41.     }
  42. }
  43. </script>
  44. </head>
  45.  
  46. <body OnLoad="empilement()">
  47.